package com.yunda.rfidutils;

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.yunda.rfid_library.NFCUtils;

import java.io.IOException;

/**
 * copyright (C), 2022, 运达科技有限公司
 * fileName TestActivity
 *
 * @author 王玺权
 * date 2022-05-18 10:57
 * description
 * history
 */
public class TestActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        NFCUtils.INSTANCE.CheckNFC(TestActivity.this);
    }

    @Override
    protected void onResume() {
        super.onResume();
        NFCUtils.INSTANCE.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
        NFCUtils.INSTANCE.onPause();
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        try {
            NFCUtils.INSTANCE.onNewIntent(intent,false);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
